package utilities;

import java.lang.reflect.*;
import java.util.*;
import org.w3c.dom.*;

public class ActionDef {

	private String name;
	private String methodName;
	private String reaction;
	private int paramCount = 0;
	private 
	Class paramClasses[];
	String paramNames[];
	
	public ActionDef(String name, String methodName, NodeList inPars)
	{
		this.name=name;
		this.methodName = methodName;

		paramClasses = new Class[inPars.getLength()];
		paramNames = new String[inPars.getLength()];
		
 	    for (int i = 0; i < inPars.getLength(); i++) {
		  	 Node n = inPars.item(i);
			 Element el = (Element) n;
		  	 paramClasses[i] = typeUtil.typeOf(el.getAttribute("type"));
		  	 paramNames[i]= el.getAttribute("name");
	    }	
 	    
 
	}
		
	public String getName() {return name;}
	public String getMethodName() {return methodName;}
	
	public int getParamCount()
	{
		return paramNames.length;
	}
	public  Class[] getParamTypes()
	{		
		return paramClasses;
	}
	public  String[] getParamNames()
	{		
		return paramNames;
	}		
	
}
